#include <iostream>
#include <string>
using namespace std;
string s;
string x(",");
string y(".");
int main()
{
    int n = 0;
    cin >> n;
    getchar();
    while (n--)
    {
        getline(cin, s);
        int  a = s.find(x);
        if (s[a - 1] == 'g' && s[a - 2] == 'n' &&
            s[a - 3] == 'o')
        {
            int b = s.find(y);
            if (s[b - 1] == 'g' && s[b - 2] == 'n' &&
                s[b - 3] == 'o')
            {
                auto  it = s.end() - 1 ;
                int _count = 0;
                while (it != s.begin())
                {
                    if (*it == ' ')
                    {
                        _count++;
                    }
                    if (_count == 3)
                        break;
                    it--;
                }
                auto ii = s.begin();
                while (ii != it)
                {
                    cout << *ii;
                    ii++;
                }
                cout << " ";
                cout << "qiao ben zhong." << endl;
            }
            else
            {
                cout << "Skipped" << endl;
            }
        }
        else
        {
            cout << "Skipped" << endl;
        }
    }
    return 0;
}
